using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes.DomainAttributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Enums;
using System.Collections.Generic;
using System.ComponentModel;

namespace Baci.ArcGIS._DataManagementTools._Package
{
    /// <summary>
    /// <para>Share Package</para>
    /// <para>Shares a package by uploading to ArcGIS Online or ArcGIS Enterprise.</para>
    /// <para>通过上传到 ArcGIS Online 或 ArcGIS Enterprise 来共享包。</para>
    /// </summary>    
    [DisplayName("Share Package")]
    public class SharePackage : AbstractGPProcess
    {
        /// <summary>
        /// 无参构造
        /// </summary>
        public SharePackage()
        {

        }

        /// <summary>
        /// 有参构造
        /// </summary>
        /// <param name="_in_package">
        /// <para>Input Package</para>
        /// <para>Input layer (.lpk, .lpkx), scene layer (.slpk), map (.mpk, .mpkx), geoprocessing (.gpk, .gpkx), tile (.tpk, .tpkx), mobile map (.mmpk), vector tile (.vtpk), address locator (.gcpk), or project (.ppkx, .aptx) package file.</para>
        /// <para>输入图层 （.lpk， .lpkx）、场景图层 （.slpk）、地图 （.mpk， .mpkx）、地理处理 （.gpk， .gpkx）、切片 （.tpk， .tpkx）、移动地图 （.mmpk）、矢量切片 （.vtpk）、地址定位器 （.gcpk） 或工程 （.ppkx， .aptx） 包文件。</para>
        /// </param>
        /// <param name="_username">
        /// <para>Username</para>
        /// <para><xdoc>
        ///   <para>The ArcGIS Online or Portal for ArcGIS user name.</para>
        ///   <para>This parameter is not available on the tool dialog box. You must sign in to a portal from the sign in option at the upper right of the application.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>ArcGIS Online 或 Portal for ArcGIS 用户名。</para>
        ///   <para>此参数在工具对话框中不可用。您必须从应用程序右上角的登录选项登录到门户。</para>
        /// </xdoc></para>
        /// </param>
        /// <param name="_password">
        /// <para>Password</para>
        /// <para><xdoc>
        ///   <para>The ArcGIS Online or ArcGIS Enterprise password.</para>
        ///   <para>This parameter is not available on the tool dialog box. You must sign in to a portal from the sign in option at the upper right of the application.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>ArcGIS Online 或 ArcGIS Enterprise 密码。</para>
        ///   <para>此参数在工具对话框中不可用。您必须从应用程序右上角的登录选项登录到门户。</para>
        /// </xdoc></para>
        /// </param>
        /// <param name="_summary">
        /// <para>Summary</para>
        /// <para>Summary of the package. The summary is displayed in the item information of the package on ArcGIS Online or ArcGIS Enterprise.</para>
        /// <para>软件包摘要。摘要将显示在 ArcGIS Online 或 ArcGIS Enterprise 上的包的项目信息中。</para>
        /// </param>
        /// <param name="_tags">
        /// <para>Tags</para>
        /// <para>Tags used to describe and identify the package. Individual tags are separated using either a comma or semicolon.</para>
        /// <para>用于描述和标识包的标记。各个标签使用逗号或分号分隔。</para>
        /// </param>
        public SharePackage(object _in_package, object _username, object _password, object _summary, object _tags)
        {
            this._in_package = _in_package;
            this._username = _username;
            this._password = _password;
            this._summary = _summary;
            this._tags = _tags;
        }
        public override string ToolboxName => "Data Management Tools";

        public override string ToolName => "Share Package";

        public override string CallName => "management.SharePackage";

        public override List<string> AcceptEnvironments => ["workspace"];

        public override object[] ParameterInfo => [_in_package, _username, _password, _summary, _tags, _credits, _public.GetGPValue(), _groups, _out_results, _organization.GetGPValue(), _publish_web_layer.GetGPValue(), _publish_results, _package_item_id, _portal_folder];

        /// <summary>
        /// <para>Input Package</para>
        /// <para>Input layer (.lpk, .lpkx), scene layer (.slpk), map (.mpk, .mpkx), geoprocessing (.gpk, .gpkx), tile (.tpk, .tpkx), mobile map (.mmpk), vector tile (.vtpk), address locator (.gcpk), or project (.ppkx, .aptx) package file.</para>
        /// <para>输入图层 （.lpk， .lpkx）、场景图层 （.slpk）、地图 （.mpk， .mpkx）、地理处理 （.gpk， .gpkx）、切片 （.tpk， .tpkx）、移动地图 （.mmpk）、矢量切片 （.vtpk）、地址定位器 （.gcpk） 或工程 （.ppkx， .aptx） 包文件。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input Package")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _in_package { get; set; }


        /// <summary>
        /// <para>Username</para>
        /// <para><xdoc>
        ///   <para>The ArcGIS Online or Portal for ArcGIS user name.</para>
        ///   <para>This parameter is not available on the tool dialog box. You must sign in to a portal from the sign in option at the upper right of the application.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>ArcGIS Online 或 Portal for ArcGIS 用户名。</para>
        ///   <para>此参数在工具对话框中不可用。您必须从应用程序右上角的登录选项登录到门户。</para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Username")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _username { get; set; }


        /// <summary>
        /// <para>Password</para>
        /// <para><xdoc>
        ///   <para>The ArcGIS Online or ArcGIS Enterprise password.</para>
        ///   <para>This parameter is not available on the tool dialog box. You must sign in to a portal from the sign in option at the upper right of the application.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>ArcGIS Online 或 ArcGIS Enterprise 密码。</para>
        ///   <para>此参数在工具对话框中不可用。您必须从应用程序右上角的登录选项登录到门户。</para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Password")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _password { get; set; }


        /// <summary>
        /// <para>Summary</para>
        /// <para>Summary of the package. The summary is displayed in the item information of the package on ArcGIS Online or ArcGIS Enterprise.</para>
        /// <para>软件包摘要。摘要将显示在 ArcGIS Online 或 ArcGIS Enterprise 上的包的项目信息中。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Summary")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _summary { get; set; }


        /// <summary>
        /// <para>Tags</para>
        /// <para>Tags used to describe and identify the package. Individual tags are separated using either a comma or semicolon.</para>
        /// <para>用于描述和标识包的标记。各个标签使用逗号或分号分隔。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Tags")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _tags { get; set; }


        /// <summary>
        /// <para>Credits</para>
        /// <para>Credits for the package. This is generally the name of the organization that is given credit for authoring and providing the content for the package.</para>
        /// <para>套餐的积分。这通常是因创作和提供包内容而获得荣誉的组织的名称。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Credits")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _credits { get; set; } = null;


        /// <summary>
        /// <para>Share with everyone</para>
        /// <para><xdoc>
        ///   <para>Specifies whether the input package will be shared and available to everybody.</para>
        ///   <bulletList>
        ///     <bullet_item>Checked—Package will be shared with everybody.</bullet_item><para/>
        ///     <bullet_item>Unchecked—Package will be shared with package owner and any selected group. This is the default.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定输入包是否可供所有人共享和使用。</para>
        ///   <bulletList>
        ///     <bullet_item>选中 - 包将与所有人共享。</bullet_item><para/>
        ///     <bullet_item>未选中 - 包将与包所有者和任何选定组共享。这是默认设置。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Share with everyone")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _public_value _public { get; set; } = _public_value._false;

        public enum _public_value
        {
            /// <summary>
            /// <para>EVERYBODY</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("EVERYBODY")]
            [GPEnumValue("true")]
            _true,

            /// <summary>
            /// <para>MYGROUPS</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("MYGROUPS")]
            [GPEnumValue("false")]
            _false,

        }

        /// <summary>
        /// <para>Groups</para>
        /// <para>List of groups to share package with.</para>
        /// <para>要与之共享包的组列表。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Groups")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public List<object> _groups { get; set; } = null;


        /// <summary>
        /// <para>Tool Succeeded</para>
        /// <para></para>
        /// <para></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Tool Succeeded")]
        [Description("")]
        [Option(OptionTypeEnum.derived)]
        public object _out_results { get; set; }


        /// <summary>
        /// <para>Share within organization only</para>
        /// <para><xdoc>
        ///   <para>Specifies whether the input package will be available within your organization only or shared publicly to everyone.</para>
        ///   <bulletList>
        ///     <bullet_item>Everybody— Package will be shared with everybody. This is the default.</bullet_item><para/>
        ///     <bullet_item>Within my organization— Package will be shared within your organization only.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定输入包是仅在组织内可用，还是公开共享给所有人。</para>
        ///   <bulletList>
        ///     <bullet_item>所有人 — 包将与所有人共享。这是默认设置。</bullet_item><para/>
        ///     <bullet_item>在我的组织内 - 包将仅在组织内共享。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Share within organization only")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _organization_value _organization { get; set; } = _organization_value._false;

        public enum _organization_value
        {
            /// <summary>
            /// <para>EVERYBODY</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("EVERYBODY")]
            [GPEnumValue("true")]
            _true,

            /// <summary>
            /// <para>MYORGANIZATION</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("MYORGANIZATION")]
            [GPEnumValue("false")]
            _false,

        }

        /// <summary>
        /// <para>Publish web layer</para>
        /// <para><xdoc>
        ///   <para>Specifies whether the package will be published as a web layer to your portal. Only tile packages, vector tile packages, and scene layer packages are supported.</para>
        ///   <bulletList>
        ///     <bullet_item>Unchecked—The package will be uploaded without publishing. This is the default.</bullet_item><para/>
        ///     <bullet_item>Checked—The package will be uploaded and published as a web layer with the same name.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定是否将包作为 Web 图层发布到门户。仅支持切片包、矢量切片包和场景图层包。</para>
        ///   <bulletList>
        ///     <bullet_item>未选中 - 包将在不发布的情况下上传。这是默认设置。</bullet_item><para/>
        ///     <bullet_item>选中 - 包将上传并发布为具有相同名称的 Web 图层。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Publish web layer")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _publish_web_layer_value _publish_web_layer { get; set; } = _publish_web_layer_value._false;

        public enum _publish_web_layer_value
        {
            /// <summary>
            /// <para>TRUE</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("TRUE")]
            [GPEnumValue("true")]
            _true,

            /// <summary>
            /// <para>FALSE</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("FALSE")]
            [GPEnumValue("false")]
            _false,

        }

        /// <summary>
        /// <para>Publish Results</para>
        /// <para></para>
        /// <para></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Publish Results")]
        [Description("")]
        [Option(OptionTypeEnum.derived)]
        public object _publish_results { get; set; }


        /// <summary>
        /// <para>Package Item ID</para>
        /// <para></para>
        /// <para></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Package Item ID")]
        [Description("")]
        [Option(OptionTypeEnum.derived)]
        public object _package_item_id { get; set; }


        /// <summary>
        /// <para>Folder</para>
        /// <para>Specifies an existing folder or the name of a new folder on the portal for the package. If a web layer is published, it is stored in the same folder.</para>
        /// <para>指定包的现有文件夹或门户上新文件夹的名称。如果发布了 Web 图层，则该图层将存储在同一文件夹中。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Folder")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _portal_folder { get; set; } = null;


        public SharePackage SetEnv(object workspace = null)
        {
            base.SetEnv(workspace: workspace);
            return this;
        }

    }

}